﻿using System;
using System.Globalization;
using System.Windows;
using System.Windows.Data;

namespace LFSRecord2.View.Converters
{
    public class IsActiveCameraVisibilityConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            bool isActiveCamera = (bool)value;
            return (isActiveCamera) ? Visibility.Visible : Visibility.Collapsed;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            Visibility v = (Visibility)value;
            return (v == Visibility.Collapsed) ? false : true;
        }
    }
}
